package com.wkbb.common.enums;

public enum DistrictLevelEnum {
    /**
     * 国家
     */
    COUNTRY(1,"国家"),
    /**
     * 省
     */
    PROVINCE(2,"省份"),
    /**
     * 城市
     */
    CITY(3,"城市"),
    /**
     * 区
     */
    AREA(4,"区");

    private DistrictLevelEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Integer value;

    private String desc;

    public Integer getValue() {
        return this.value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (DistrictLevelEnum districtLevel : DistrictLevelEnum.values()) {
            if (districtLevel.getValue().intValue()==value) {
                return districtLevel.getDesc();
            }
        }
        return null;
    }
}
